import { request } from 'config/request'
import config from "../../../../config/config";

// 角色详情
export async function getDetail(params) {
  return request({
    url: `admin/permissionRole/detail`,
    method: 'POST',
    data: params
  });
};

// 角色新增
export async function addRole(params) {
  return request({
    url: `admin/permissionRole/create`,
    method: 'POST',
    headers: {
      "Content-type": "application/json"
    },
    data: params
  });
};

// 角色修改
export async function editRole(params) {
  return request({
    url: `admin/permissionRole/update`,
    method: 'POST',
    headers: {
      "Content-type": "application/json"
    },
    data: params
  });
};

// 获取资源树
export async function getResource(params) {
  return request({
    url: `${config.sysApiHeader}/v1/pearlriver/comm/resource/application/get`,
    method: 'GET',
    data: params
  });
};


// // 获取应用列表
// export async function getAppList(params) {
//     return request({
//         url: `${config.sysApiHeader}/v1/pearlriver/comm/role/application/list`,
//         method: 'GET',
//         data: params
//     });
// };



